package Year22_Month03.day09;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int count = 0;
            int n = sc.nextInt();
            StringBuilder myString = new StringBuilder();
            while(n != 0){
                myString.append(n % 2);
                n /= 2;
            }
            char[] myCharArr = myString.toString().toCharArray();
            for (int i = 0; i < myCharArr.length; i++) {
                if(myCharArr[i] == '1'){
                    count++;
                }
            }
            System.out.println(count);
        }
    }
}
